{template '_header'}
<script>document.title = "{$_W['shopset']['shop']['name']}"; </script>
<link rel="stylesheet" href="../addons/ewei_shopv2/plugin/article/template/mobile/default/images/mobile.css" />
<div class='fui-page  fui-page-current article-index-page'>

	{if is_h5app()}
	<div class="fui-header">
		<div class="fui-header-left">
			<a class="back"></a>
		</div>
		<div class="title">{$_W['shopset']['shop']['name']}</div>
		<div class="fui-header-right"></div>
	</div>
	{/if}

	<div class='fui-content'>
		
		<div class="fui-article-page">
			
			<div class="fui-article-title">{$article['article_title']}</div>
			<div class="fui-article-subtitle">{if !empty($article['article_mp'])}<a href="{if !empty($_W['shopset']['share']['followurl'])}{$_W['shopset']['share']['followurl']}{else}javascript:;{/if}">{$article['article_mp']}</a> 发布时间: {$article['article_date_v']}{if !empty($article['article_author'])} 作者: {$article['article_author']}{/if} {/if} </div>
			<!-- 关注提示 -->
			{if !$followed && !empty($_W['shopset']['share']['followurl'])}
				<div class="fui-list-group external" onclick="location.href='{$_W['shopset']['share']['followurl']}'">
					<div class="fui-list">
						<div class="fui-list-media">
							<img class="round" src="{php echo tomedia($_W['shopset']['shop']['logo'])}">
						</div>
						<div class="fui-list-inner">
							<div class="title">{if !empty($article['article_mp'])} {$article['article_mp']} {else} {$_W['shopset']['shop']['name']} {/if}</div>
							<div class="subtitle">{$_W['shopset']['shop']['description']}</div>
						</div>
						<div class="fui-list-angle" style="width: 3rem; margin-right: 0;display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; flex-shrink: 0; flex-wrap: nowrap;">
							<div class="btn btn-sm btn-success" style="width: inherit; padding: 0;" onclick="location.reload()"><i class="icon icon-add"></i>关注</div>
						</div>
					</div>
				</div>
			{/if}
			<div class="fui-article-content">
				{if !empty($article['article_areas'])}
					<div class="fui-article-gps">
						<p><i class="icon icon-address"></i> 正在获取地理位置...</p>
						<p>请开启GPS并允许获取位置信息</p>
					</div>
					<div class="fui-article-notread">
						<p>此文章内容仅限指定区域内用户查看</p>
						<p>(请开启GPS并允许获取位置信息)</p>
					</div>
				{else}
					{$article['article_content']}
				{/if}
			</div>
			
			<div class="fui-article-subtitle">
				<div class="nav"><i class="icon icon-person2"></i> {$readnum} </div>
				<div class="nav padding" {if !empty($openid) && is_weixin()}id="likebtn" data-num="{$likenum}" data-state="{if !empty($state['like'])}1{else}0{/if}"{/if}>
					<i class="icon {if !empty($state['like']) && is_weixin()}icon-likefill text-danger{else}icon-like{/if}"></i>
					<span>{$likenum}</span>
				</div>
				{if !empty($article['article_linkurl'])}
					<div class="nav" style="line-height: 1.3rem; color: ; margin-left: 0.4rem;" onclick="location.href='{$article['article_linkurl']}'">查看原文 </div>
				{/if}
				{if $article['article_report']==1 && !empty($openid) && is_weixin()}
					<a class="nav right" href="{php echo mobileUrl('article/report', array('aid'=>$article['id']))}">投诉</a>
				{/if}
			</div>
			
		</div>

		{if $article['product_advs_type']!=0 && !empty($advs)}
			{if !empty($article['product_advs_title'])}
				<div class="fui-line title">
					<div class="text">{$article['product_advs_title']}</div>
				</div>
			{/if}
			<div class="swipe">
				<div class="inner">
					<div data-transition="500" class="fui-swipe">
						<div class="fui-swipe-wrapper">
							{loop $advs $adv}
								{if !empty($adv['img'])}
									<a href="{if empty($adv['link'])}javascript:;{else}{$adv['link']}{/if}" class="fui-swipe-item external">
										<img src="{$adv['img']}">
									</a>
								{/if}
							{/loop}
						</div>
						<div class='fui-swipe-page'></div>
					</div>
				</div>
			</div>
			{if !empty($article['product_advs_more'])}
				<div class="fui-line subtitle link">
					<a class="text external" href="{if !empty($article['product_advs_link'])}{$article['product_advs_link']}{else}javascript:;{/if}">{$article['product_advs_more']} </a>
				</div>
			{/if}
		{/if}
	</div>
	<script language="javascript">
	     require(['../addons/ewei_shopv2/plugin/article/static/js/common.js'],function(modal){
	     	modal.init({aid: "{$article['id']}", areas: {php echo json_encode($article['areas'])}, shareid: "{$_GPC['shareid']}"});
	     });
	</script>
</div>
{template '_footer'}